package com.ls.modules.sys.dal.jpa.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ls.common.baseClass.BackStageBaseObject;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * @author: xiaosu
 * @date: 2018-09-25  17:08
 */

@Data
@Entity
@Table(name = "sys_user_token")
@ApiModel(parent = BackStageBaseObject.class)
public class SysUserTokenEntity extends BackStageBaseObject {


    /**
     *sys_user  id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private  Long userId;

    /**
     *单次 md5  uuid
     */
    private  String token;
    /**
     *token  过期时间    单次登录过期时间详见 userTokenManager
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private  Date   expireTime;

    /**
     *token  刷新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;


}
